/*
 * Copyright:  2018 smarabbit studio.
 *
 *  Licensed under the Confluent Community License; you may not use this file
 *  except in compliance with the License.  You may obtain a copy of the License at
 *
 *  http://www.confluent.io/confluent-community-license
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 *  WARRANTIES OF ANY KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations under the License.
 *
 *  @作   者： 黄开晖 (117227773@qq.com)
 *  @日   期:  2021年9月8日
 */
package com.massyframework.beanskin.license.signature.wizard;

import java.util.ArrayList;
import java.util.List;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;

/**
 * 签名数据
 * @author huangkh
 *
 */
public class SignatureData {

	private Long customerId;
	private String customerName;
	
	private ObservableList<Module> modules;
	private CertificateEntry certificateEntry;
	
	private List<Module> signaModules;
	
	/**
	 * 
	 */
	public SignatureData() {
		this.modules = FXCollections.observableArrayList();
		this.signaModules = new ArrayList<>();
	}
	
	/**
	 * 客户编号
	 * @return {@link Long}
	 */
	public Long getCustomerId() {
		return this.customerId;
	}
	
	/**
	 * 设置客户编号
	 * @param value {@link Long}
	 */
	public void setCusstomerId(Long value) {
		this.customerId = value;
	}
	
	/**
	 * 客户名称
	 * @return {@link String}
	 */
	public String getCustomerName() {
		return this.customerName;
	}
	
	/**
	 * 设置客户名称
	 * @param value {@link String}
	 */
	public void setCustomerName(String value) {
		this.customerName = value;
	}
	
	
	/**
	 * 添加模块集合
	 * @return {@link ObservableList},可能返回null.
	 */
	public ObservableList<Module> getModules(){
		return this.modules;
	}
	
	/**
	 * 添加模块
	 * @param modules {@link List}
	 */
	public void addAll(List<Module> modules) {
		if (modules != null) {
			this.modules.addAll(modules);
		}
	}

	/**
	 * 证书
	 * @return the certificateEntry
	 */
	public CertificateEntry getCertificateEntry() {
		return certificateEntry;
	}

	/**
	 * 设置证书记录
	 * @param certificateEntry the certificateEntry to set
	 */
	public void setCertificateEntry(CertificateEntry certificateEntry) {
		this.certificateEntry = certificateEntry;
	}

	/**
	 * 待签名模块
	 * @return the signaModules
	 */
	public List<Module> getSignaModules() {
		return signaModules;
	}
	
}
